/* 
 * @author Guan Junming <guan.junming@mabang.net>
 * @Copyright MaBang Tech<mabang.net>
 */
$(function(){
    $("#menubar").accordion({
        header: "h3"
    });
    //the create and update form editor
    $("#editor").dialog({
        autoOpen: false
    });
    theForm = $("#theForm")[0];
});
function showCreate(){   
    theForm.elements["action"].value = "create";
    $('#editor').dialog('open');   
}
function showDelete(actionUrl, key){
    if(confirm("确定删除?")){
        location.href = actionUrl+"&action=delete&id="+key;
    }
}